<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

	<title>订单页</title>

	<link rel="stylesheet" type="text/css" href="http://localhost/c39/waimai/Application/Index/View/Public/css/commit.css">
	<script type='text/javascript' src='http://localhost/C39/waimai/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/C39/waimai/hdphp/hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<link href='http://localhost/C39/waimai/hdphp/hdjs/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/C39/waimai/hdphp/hdjs/js/hdjs.js'></script>
<script src='http://localhost/C39/waimai/hdphp/hdjs/js/hdvalidate.js'></script>
<script src='http://localhost/C39/waimai/hdphp/hdjs/js/slide.js'></script>
<script src='http://localhost/C39/waimai/hdphp/hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
HOST = '<?php echo $GLOBALS['user']['HOST'];?>';
ROOT = '<?php echo $GLOBALS['user']['ROOT'];?>';
WEB = '<?php echo $GLOBALS['user']['WEB'];?>';
URL = '<?php echo $GLOBALS['user']['URL'];?>';
APP = '<?php echo $GLOBALS['user']['APP'];?>';
COMMON = '<?php echo $GLOBALS['user']['COMMON'];?>';
HDPHP = '<?php echo $GLOBALS['user']['HDPHP'];?>';
HDPHPDATA = '<?php echo $GLOBALS['user']['HDPHPDATA'];?>';
HDPHPEXTEND = '<?php echo $GLOBALS['user']['HDPHPEXTEND'];?>';
MODULE = '<?php echo $GLOBALS['user']['MODULE'];?>';
CONTROLLER = '<?php echo $GLOBALS['user']['CONTROLLER'];?>';
ACTION = '<?php echo $GLOBALS['user']['ACTION'];?>';
STATIC = '<?php echo $GLOBALS['user']['STATIC'];?>';
HDPHPTPL = '<?php echo $GLOBALS['user']['HDPHPTPL'];?>';
VIEW = '<?php echo $GLOBALS['user']['VIEW'];?>';
PUBLIC = '<?php echo $GLOBALS['user']['PUBLIC'];?>';
CONTROLLERVIEW = '<?php echo $GLOBALS['user']['CONTROLLERVIEW'];?>';
HISTORY = '<?php echo $GLOBALS['user']['HISTORY'];?>';
</script>
	<script type="text/javascript">
	var stid = <?php echo $_GET['stid'];?>;
	var qisong = <?php echo $storeInfo['risedelivery'];?>;

	var peisong = <?php echo $storeInfo['delivery'];?>;
	var mian = 0;

	<?php if(in_array('jian',$attr)){?>
	mian=6;
	<?php }?>


	</script>
	<script type="text/javascript" src="http://localhost/c39/waimai/Application/Index/View/Public/js/oreder.js"></script>
</head>
<body>
	<div id="man">
		<div class="breadcrumb">
		<a href="/waimai">首页</a>
		<i>></i>
		<a href="<?php echo U('Content/index',array('stid'=>$storeInfo['stid']));?>"><?php echo $storeInfo['stname'];?></a>
		<i>></i>
		<span>确认订单</span>
		</div>
	</div>

	<div id="content">

		<div class="content-l">
		<div class="title">
			<h2>
			<span id="cart_shopName"><?php echo $storeInfo['stname'];?></span>
			</h2>
		</div>
		<div class="cart-panel">
			
		<table>
			<thead class="cart-head">
			<tr>
			<td class="item-name">菜品</td>
			<td class="item-price">单价</td>
			<td class="item-count">份数</td>
			<td class="item-price-all">金额</td>
			<td class="item-delete"></td>
			</tr>
			</thead>

			<tbody class="item-list">
			<?php if(is_array($defaultGetall['goods'])){?><?php  foreach($defaultGetall['goods'] as $k=>$v){ ?>
				
			<tr id="<?php echo $v['id'];?>" class="item" data-style='<?php echo $k;?>'>
			<td class="item-name"><?php echo $v['name'];?></td>
			<td class="item-price">¥<?php echo $v['price'];?></td>
			<td class="item-count">
			<input type="hidden" value="5998443914987653320">
			<span class="item-minus" type="button" value="-"></span>
			<input class="item-count" type="input" value="<?php echo $v['num'];?>">
			<span class="item-plus" type="button" value="+"></span>
			</td>
			<td class="item-price-all">¥<?php echo $v['total'];?></td>
			<td class="item-delete">
			<span class="item-delete-icon">×</span>
			</td>
			</tr>
				
			<?php }}?>
			</tbody>
			</table>

			<table class="collect">
			<tbody>
			<tr class="item" data-node="wmianNode">
			<td class="item-name" colspan="3">配送费</td>
			<td class="item-price-all">
			¥
			<span id="deliveryFee"><?php echo $storeInfo['delivery'];?></span>
			</td>
			<td class="item-delete"></td>
			</tr>
			<tr class="item" style="display:none" data-node="discountNode"></tr>
			</tbody>
			</table>
			<div class="bottom-div">
			
			<div class="warning-tips">
			<a class="delivery-tip" href="/waimai/shop/9628936730679615213"> 您的主食点了吗？</a>
			</div>
			<div class="order-msg">
			总价：
			<span class="order-total">
			¥
			<span id="total_money"><?php echo $defaultGetall[total];?></span>
			</span>
			<p data-node="discountMsg" style="display: none;"></p>
			</div>
			<div class="clearfix"></div>
			<div class=""></div>
			</div>
			</div>


		</div>
		<div class="content-r">
			<div class="delivery-title">
			<h2>送餐信息</h2>
			</div>
			<?php if(!$defaultUser){?>
			<div class="inputInfo" style="">
				<form action="" method="post">
					
					<div class="form-group">
					<div class="input-control">
					<input class="placeholder-con" type="text" value="" placeholder="您的姓名" name="user_name">
					</div>
					<!-- <div class="error-msg v-hide">请填写您的姓名，不能超过8个字符</div> -->
					</div>

					<div class="form-group">
					<div class="input-control">
					<input type="hidden" value="1" name="gender">
					<div class="s-gender selected" data-gender="1">
					<i></i>
					<span>先生</span>
					</div>
					<div class="s-gender" data-gender="2">
					<i></i>
					<span>女士</span>
					</div>
					</div>
				<!-- 	<div class="error-msg v-hide">请选择您的性别</div> -->
					</div>

					<div class="form-group">
					<div class="input-control">
					<input class="placeholder-con" type="text" value="" placeholder="您的手机号" name="user_name">
					</div>
					</div>
					<!-- <div class="error-msg v-hide">请填写您的姓名，不能超过8个字符</div> -->
					<div class="form-group">
					<div class="input-control">
						<textarea placeholder="您的详细地址"></textarea> 
						</div>
			</div>

			<div class="form-group form-submit">
			<input class="saveBtn" type="button" value="保存送餐信息" data-node="saveBtn">
			</div>
			</form>
					
			

			</div>
			
			<?php  }else{ ?>

			<div class="address_list">
					<ul>
				<?php if(is_array($defaultUser)){?><?php  foreach($defaultUser as $key=>$v){ ?>
					<li class=""  data-msg="<?php echo $v['name'];?>$<?php echo $v['sex'];?>$<?php echo $v['cellphone'];?>$<?php echo $v['detail'];?>">
							<div class="addr_item">
								
								<span class="name"><?php echo $v['name'];?></span>
								<?php if($v['sex']=='男'){?>
								<span class="sex">先生</span>	
								<?php }?>
								<?php if($v['sex']=='女'){?>
								<span class="sex">女士</span>
								<?php }?>

								<span class="alter"><a href="">编辑</a><a href="">删除</a></span>
							</div>
							<div class="addr-con">
							<p class="phone"><?php echo $v['cellphone'];?></p>
							<p class="addr-desc"><?php echo $v['detail'];?></p>

							</div>
							<span class="select-ico"></span>
						</li>
						<?php }}?>
					</ul>
				</div>
				<?php }?>


			<div class="list-bottom">
				

			</div>

			<div class="form-group">
			<div class="input-control">发票信息:
			<input class="placeholder-con" type="text" value="" placeholder="发票信息" name="invoice">
			</div>
					<!-- <div class="error-msg v-hide">请填写您的姓名，不能超过8个字符</div> -->
		</div>
		<div class="form-group">
			<div class="input-control">备注信息:
			<input class="placeholder-con" type="text" value="" placeholder="备注信息" name="remark">
			</div>
			</div>

			<div class="form-group form-submit">
			<input class="saveBtn" type="button" value="确认下单" data-node="saveBtn">
			</div>

		</div>

	</div>
</body>
</html>